package com.atguigu.gulimall.gulimallorder.feign;

import com.atguigu.common.utils.R;
import com.atguigu.gulimall.gulimallorder.vo.WareSkuLockVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * @Author: Zjn ; Bring it on !!!
 * @Date: 2021/11/25 0025 9:59
 * Note:
 */
@FeignClient("gulimall-ware")
public interface WmsFeignService {
    /**
     * 查询sku是否有库存
     */
    @PostMapping("/gulimallware/waresku/hasStock")
    R getSkuHasStock(@RequestBody List<Long> skuIds);

    @GetMapping("/gulimallware/wareinfo/fare")
    R getFare(@RequestParam("addrId") Long addrId);

    @PostMapping("/gulimallware/waresku/lock/order")
    R orderLockStock(WareSkuLockVo vo);
}
